<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <%- include common/meta %>
</head>
<body class="bg-gray js-body">
<div class="navbar nav-bg  bottom-border">
    <div class="container">
        <div class="navbar-collapse">
            <ul class="nav navbar-nav shadow full-width">
                <li >
                    <a href="/" title="误码者" data-toggle="tooltip" data-placement="bottom" class="color-white js-home-menu <%if((!locals.currentMenu)||currentMenu=="home"){%>current-menu<%}%>">
                        <img src="/images/logo.png" class="logo"/>&nbsp;误码者
                    </a>
                </li>
                <li role="presentation" class="dropdown js-category">
                    <a title="分类查看"  data-placement="bottom" class="dropdown-toggle color-white js-category-content <%if(locals.currentMenu&&currentMenu=="category"){%>current-menu<%}%>" data-toggle="dropdown" href="javascript:void(0);">
                        <!-- <i class="glyphicon glyphicon-list"></i> &nbsp;<span class="js-category-menu-name">分类查看</span> -->
                        <i class="glyphicon glyphicon-list"></i> &nbsp;分类查看&nbsp;&nbsp;<i class="glyphicon glyphicon-chevron-down"></i>
                    </a>
                    <ul class="dropdown-menu l-select js-category-menu" role="menu"> </ul>
                </li>
                <li>
                    <a title="我发表的日志" data-toggle="tooltip" data-placement="bottom" href="javascript:void(0);" class="color-white js-my-content-menu <%if(locals.currentMenu&&currentMenu=="mycontent"){%>current-menu<%}%>" >
                        <i class="glyphicon glyphicon-book"></i>&nbsp;我的日志
                    </a>
                </li>
                <!--<li  title="我的评说"><a href="javascript:void(0);" class="color-white js-my-comment-menu" >
                        <i class="glyphicon glyphicon-comment"></i>&nbsp;我的评说
                    </a>
                </li>-->
                <li>
                    <a title="发表日志" data-toggle="tooltip" data-placement="bottom" href="/content/addPage?view=addContent" class="color-white js-post-log <%if(locals.currentMenu&&currentMenu=="content"){%>current-menu<%}%>">
                        <i class="glyphicon glyphicon-pencil"></i>&nbsp;发表日志
                    </a>
                </li>
                <li>
                    <a title="公告" data-toggle="tooltip" data-placement="bottom" href="/log?view=log&page=1" class="color-white badge-father js-log <%if(locals.currentMenu&&currentMenu=="log"){%>current-menu<%}%>">
                        &nbsp;<i class="glyphicon glyphicon-volume-up"></i>&nbsp;公告
                        <span class="badge js-log-count"></span>
                    </a>
                </li>
		        <% if(session.user != null){ %>
                <li>
                    <a title="后台管理" data-toggle="tooltip" data-placement="bottom" href="/manager" class="color-white" >
                        <i class="glyphicon glyphicon-user"></i>&nbsp;
                        <%= session.user.realName?session.user.realName:session.user.userName %>
                    </a>
                </li>
        		<li>
                    <a title="退出系统" data-toggle="tooltip" data-placement="bottom" href="javascript:void(0)" class="color-white js-logout-btn" >
                        <i class="glyphicon glyphicon-log-out"></i>&nbsp;退出
                    </a>
                </li>
                
                <% }else{ %>
                <li>
                    <a title="老用户登录" data-toggle="tooltip" data-placement="bottom" href="javascript:void(0)" class="js-login-btn color-white">
                        <i class="glyphicon glyphicon-log-in"></i>&nbsp;登录
                    </a>
                </li>
                <li>
                    <a title="新用户注册" data-toggle="tooltip" data-placement="bottom" href="javascript:void(0)" class="js-register-btn color-white">
                        <i class="glyphicon glyphicon-registration-mark"></i>&nbsp;注册
                    </a>
                </li>
                <% } %>
                <li role="presentation" class="dropdown js-search-bar search-bar" style="padding: 0px 10px 0px 10px;">
                    <input data-toggle="tooltip" data-placement="bottom"  type="search" data-toggle="dropdown" maxlength="50" class="dropdown-toggle form-control search-input js-search" value="<%if(locals.key){%><%=key%><%}%>" placeholder="回车搜索" />
                    <ul class="dropdown-menu l-search-select hide js-search-panel" role="menu"> </ul>
                </li>
            </ul>
            <!--
            <ul class="nav navbar-nav pull-right js-user-bar">
            </ul>
            -->
            <div class="hide">
                <div class="js-login-panel">
                <div class="row js-panel-row">
                    <div class="col-sm-12 col-xs-12">
                    <form action="javascript:void(0)" class="form-horizontal l-login-panel" role="form">
                        <div class="input-group">
                            <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
                            <input type="text" class="form-control js-login-username" value=""
                                   placeholder="用户名" maxlength="20"/>
                        </div>
                        <div class="input-group">
                            <span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
                            <input type="password" class="form-control js-login-password" value=""
                                   placeholder="密码" maxlength="20"/>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-12 l-padding-vertical">
                                <button type="submit" class="btn btn-primary col-sm-12 col-xs-12 js-signIn-btn">登录</button>
                            </div>
                        </div>
                    </form>
                    </div>
                    </div>
                </div>
                <div class="container js-register-panel">
                    <div class="row js-panel-row">
                    <div class="col-sm-12 col-xs-12">
                    <form action="javascript:void(0)" class="form-horizontal l-register-panel" role="form">
                        <div class="input-group">
                            <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
                            <input type="text" class="form-control js-register-username" value=""
                                   placeholder="用户名" maxlength="20"/>
                        </div>
                        <div class="input-group">
                            <span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
                            <input type="password" class="form-control js-register-password" value=""
                                   placeholder="密码" maxlength="20"/>
                        </div>
                        <div class="input-group">
                            <span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
                            <input type="password" class="form-control js-register-password2" value=""
                                   placeholder="确认密码" maxlength="20"/>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-12 l-padding-vertical">
                                <button type="submit" class="btn btn-primary col-sm-12 col-xs-12 js-signUp-btn">注册</button>
                            </div>
                        </div>
                    </form>
                     </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="container ">
    <article>
